<h3>Error Wizard - Custom error handling</h3>
<p>The error wizard offers the following features:
<ol>
	<li><b>Advanced error logging</b>: Store application errors in <a href="<?php print WEBROOT;?>/app/errors/log" target="_blank"><b>.CSV files</b></a> instead of the .log file. <i>(does <b>not</b> depend on the <b>Environment</b>)</i></li>
	<li><b>Custom error and exception handling</b>: Display the error wizard for standard WordPress and DesignJotter errors and exceptions. Display a lightbox wizard for AJAX requests that trigger errors or exceptions. <i>(only works when the <b>Environment</b> is set to <b>Development</b>)</i></li>
</ol></p>
<?php 
	print formx('Are you sure you want to activate/deactivate the Error Wizard?').
	'<p><label>'.input('radio',array('err',''),'1',(ERROR_WIZARD?array('checked'=>'checked'):null)).' Active</label><br/>'.
	'<label>'.input('radio',array('err',''),'0',(ERROR_WIZARD?null:array('checked'=>'checked'))).' Inactive</label></p><br/>'.
	submit('Save',null,array('key'=>'w')).
	form(true);
?>
<h3>Environment</h3>
<p>Set the DesignJotter's application environment.<br>
<ol>
<li>In <b>Production</b> mode, no errors are displayed anywhere on the website. If the Error Wizard is active, however, those errors will be stored in .CSV files (at <i><?php print APP_ROOT.DS.'errors'.DS.'log'.DS.'dd-mm-yyyy.csv'?></i>).</li>
<li>In <b>Development</b> mode, the Error Wizard pops up every time a catchable Exception or an Error is triggered, helping your developer fix the issue in the shortest timespan possible.<br/>You also gain access to the (secret) <b>"Under the Hood"</b> feature.</li>
</ol></p>
<?php 
	print formx('Are you sure you want to change the application environment?').
	'<p><label>'.input('radio',array('env',''),'1',(ENVIRONMENT?array('checked'=>'checked'):null)).' Production</label><br/>'.
	'<label>'.input('radio',array('env',''),'0',(ENVIRONMENT?null:array('checked'=>'checked'))).' Development</label></p><br/>'.
	submit('Save',null,array('key'=>'e')).
	form(true);
?>
<?php if(!ENVIRONMENT):?>
<h3>Under the hood</h3>
<p>This theme has a hidden feature called "Under the hood" your developer will surely love.<br/>
By enabling it, you gain access to a debugging Wizard every time you visit a <?php print WP_OCTOMS_TITLE;?> admin page.<br/>
You will notice an icon on the bottom of the page.<br/></p>
<p>For this feature to work correctly, a <b>.htaccess</b> file and a <b>php.ini</b> file are created at <i><?php print ROOT;?></i>.</p>
<?php 
	print formx('Are you sure you want to activate/deactivate the "Under the hood" feature?').
	'<p><label>'.input('radio',array('uth',''),'1',(DEBUG_WIZARD?array('checked'=>'checked'):null)).' Active</label><br/>'.
	'<label>'.input('radio',array('uth',''),'0',(DEBUG_WIZARD?null:array('checked'=>'checked'))).' Inactive</label></p><br/>'.
	submit('Save',null,array('key'=>'u')).
	form(true);
?>
<?php endif;?>